package com.xunua.NaoZiKongBai.RegisterActivity;

import com.xunua.NaoZiKongBai.Base.BasePresenter;

/**
 * @user XUNUA
 * @email xunua@outlook.com
 * @creat time 2020/5/15 19:13
 */
public class RegisterPresenter extends BasePresenter<RegisterModel,RegisterActivity,RegisterContract.VP> {
    @Override
    public RegisterModel getModelInstance() {
        return new RegisterModel(this);
    }

    @Override
    public RegisterContract.VP getContract() {
        return new RegisterContract.VP() {
            @Override
            public void request_register(String phone, String pwd,String yzm) {
                mModel.getContract().request_register(phone, pwd,yzm);
            }

            @Override
            public void response_register(boolean isRegister, String errStr) {
                mView.getContract().response_register(isRegister, errStr);
            }
        };
    }
}
